home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / HELPINFO.ZIP / VB_PROG.ZIP / HELPINFO.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-01-04  |  24.8 KB  |  695 lines

  1. VERSION 2.00
  2. Begin Form frmSample 
  3.    BackColor       =   &H00808080&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Sample Help"
  6.    ClientHeight    =   3795
  7.    ClientLeft      =   5625
  8.    ClientTop       =   4320
  9.    ClientWidth     =   5130
  10.    FontBold        =   0   'False
  11.    FontItalic      =   0   'False
  12.    FontName        =   "MS Sans Serif"
  13.    FontSize        =   8.25
  14.    FontStrikethru  =   0   'False
  15.    FontUnderline   =   0   'False
  16.    Height          =   4485
  17.    Left            =   5565
  18.    LinkTopic       =   "Form1"
  19.    MaxButton       =   0   'False
  20.    ScaleHeight     =   3795
  21.    ScaleWidth      =   5130
  22.    Top             =   3690
  23.    Width           =   5250
  24.    Begin SSCommand cmdClose 
  25.       BevelWidth      =   3
  26.       Caption         =   "Copy"
  27.       Font3D          =   1  'Raised w/light shading
  28.       FontBold        =   -1  'True
  29.       FontItalic      =   0   'False
  30.       FontName        =   "Arial"
  31.       FontSize        =   8.25
  32.       FontStrikethru  =   0   'False
  33.       FontUnderline   =   0   'False
  34.       ForeColor       =   &H00000040&
  35.       Height          =   375
  36.       Index           =   2
  37.       Left            =   3100
  38.       TabIndex        =   31
  39.       Top             =   2220
  40.       Width           =   1885
  41.    End
  42.    Begin SSPanel cmdReadMe 
  43.       BevelInner      =   1  'Inset
  44.       BevelWidth      =   3
  45.       Caption         =   "Panel3D1"
  46.       Height          =   3795
  47.       Left            =   0
  48.       Outline         =   -1  'True
  49.       TabIndex        =   0
  50.       Top             =   0
  51.       Width           =   5145
  52.       Begin SSCommand cmdClose 
  53.          BevelWidth      =   3
  54.          Caption         =   "Print"
  55.          Font3D          =   1  'Raised w/light shading
  56.          FontBold        =   -1  'True
  57.          FontItalic      =   0   'False
  58.          FontName        =   "Arial"
  59.          FontSize        =   8.25
  60.          FontStrikethru  =   0   'False
  61.          FontUnderline   =   0   'False
  62.          ForeColor       =   &H00000040&
  63.          Height          =   375
  64.          Index           =   3
  65.          Left            =   3100
  66.          TabIndex        =   32
  67.          Top             =   2580
  68.          Width           =   1885
  69.       End
  70.       Begin SSCommand cmdClose 
  71.          BevelWidth      =   3
  72.          Caption         =   "Close Glossary"
  73.          Font3D          =   1  'Raised w/light shading
  74.          FontBold        =   -1  'True
  75.          FontItalic      =   0   'False
  76.          FontName        =   "Arial"
  77.          FontSize        =   8.25
  78.          FontStrikethru  =   0   'False
  79.          FontUnderline   =   0   'False
  80.          ForeColor       =   &H00000040&
  81.          Height          =   375
  82.          Index           =   1
  83.          Left            =   1245
  84.          TabIndex        =   30
  85.          Top             =   2580
  86.          Width           =   1875
  87.       End
  88.       Begin SSCommand cmdClose 
  89.          BevelWidth      =   3
  90.          Caption         =   "Close Help"
  91.          Font3D          =   1  'Raised w/light shading
  92.          FontBold        =   -1  'True
  93.          FontItalic      =   0   'False
  94.          FontName        =   "Arial"
  95.          FontSize        =   8.25
  96.          FontStrikethru  =   0   'False
  97.          FontUnderline   =   0   'False
  98.          ForeColor       =   &H00000040&
  99.          Height          =   375
  100.          Index           =   0
  101.          Left            =   1245
  102.          TabIndex        =   29
  103.          Top             =   2220
  104.          Width           =   1875
  105.       End
  106.       Begin SSCommand cmdGlossary 
  107.          Caption         =   "O"
  108.          FontBold        =   -1  'True
  109.          FontItalic      =   0   'False
  110.          FontName        =   "MS Sans Serif"
  111.          FontSize        =   9.75
  112.          FontStrikethru  =   0   'False
  113.          FontUnderline   =   0   'False
  114.          ForeColor       =   &H00FF0000&
  115.          Height          =   375
  116.          Index           =   15
  117.          Left            =   495
  118.          TabIndex        =   28
  119.          Top             =   3300
  120.          Width           =   375
  121.       End
  122.       Begin SSCommand cmdGlossary 
  123.          Caption         =   "P"
  124.          FontBold        =   -1  'True
  125.          FontItalic      =   0   'False
  126.          FontName        =   "MS Sans Serif"
  127.          FontSize        =   9.75
  128.          FontStrikethru  =   0   'False
  129.          FontUnderline   =   0   'False
  130.          ForeColor       =   &H00FF0000&
  131.          Height          =   375
  132.          Index           =   16
  133.          Left            =   870
  134.          TabIndex        =   27
  135.          Top             =   3300
  136.          Width           =   375
  137.       End
  138.       Begin SSCommand cmdGlossary 
  139.          Caption         =   "Q"
  140.          FontBold        =   -1  'True
  141.          FontItalic      =   0   'False
  142.          FontName        =   "MS Sans Serif"
  143.          FontSize        =   9.75
  144.          FontStrikethru  =   0   'False
  145.          FontUnderline   =   0   'False
  146.          ForeColor       =   &H00FF0000&
  147.          Height          =   375
  148.          Index           =   17
  149.          Left            =   1245
  150.          TabIndex        =   26
  151.          Top             =   3300
  152.          Width           =   375
  153.       End
  154.       Begin SSCommand cmdGlossary 
  155.          Caption         =   "R"
  156.          FontBold        =   -1  'True
  157.          FontItalic      =   0   'False
  158.          FontName        =   "MS Sans Serif"
  159.          FontSize        =   9.75
  160.          FontStrikethru  =   0   'False
  161.          FontUnderline   =   0   'False
  162.          ForeColor       =   &H00FF0000&
  163.          Height          =   375
  164.          Index           =   18
  165.          Left            =   1620
  166.          TabIndex        =   25
  167.          Top             =   3300
  168.          Width           =   375
  169.       End
  170.       Begin SSCommand cmdGlossary 
  171.          Caption         =   "S"
  172.          FontBold        =   -1  'True
  173.          FontItalic      =   0   'False
  174.          FontName        =   "MS Sans Serif"
  175.          FontSize        =   9.75
  176.          FontStrikethru  =   0   'False
  177.          FontUnderline   =   0   'False
  178.          ForeColor       =   &H00FF0000&
  179.          Height          =   375
  180.          Index           =   19
  181.          Left            =   1995
  182.          TabIndex        =   24
  183.          Top             =   3300
  184.          Width           =   375
  185.       End
  186.       Begin SSCommand cmdGlossary 
  187.          Caption         =   "T"
  188.          FontBold        =   -1  'True
  189.          FontItalic      =   0   'False
  190.          FontName        =   "MS Sans Serif"
  191.          FontSize        =   9.75
  192.          FontStrikethru  =   0   'False
  193.          FontUnderline   =   0   'False
  194.          ForeColor       =   &H00FF0000&
  195.          Height          =   375
  196.          Index           =   20
  197.          Left            =   2370
  198.          TabIndex        =   23
  199.          Top             =   3300
  200.          Width           =   375
  201.       End
  202.       Begin SSCommand cmdGlossary 
  203.          Caption         =   "U"
  204.          FontBold        =   -1  'True
  205.          FontItalic      =   0   'False
  206.          FontName        =   "MS Sans Serif"
  207.          FontSize        =   9.75
  208.          FontStrikethru  =   0   'False
  209.          FontUnderline   =   0   'False
  210.          ForeColor       =   &H00FF0000&
  211.          Height          =   375
  212.          Index           =   21
  213.          Left            =   2745
  214.          TabIndex        =   22
  215.          Top             =   3300
  216.          Width           =   375
  217.       End
  218.       Begin SSCommand cmdGlossary 
  219.          Caption         =   "V"
  220.          FontBold        =   -1  'True
  221.          FontItalic      =   0   'False
  222.          FontName        =   "MS Sans Serif"
  223.          FontSize        =   9.75
  224.          FontStrikethru  =   0   'False
  225.          FontUnderline   =   0   'False
  226.          ForeColor       =   &H00FF0000&
  227.          Height          =   375
  228.          Index           =   22
  229.          Left            =   3120
  230.          TabIndex        =   21
  231.          Top             =   3300
  232.          Width           =   375
  233.       End
  234.       Begin SSCommand cmdGlossary 
  235.          Caption         =   "W"
  236.          FontBold        =   -1  'True
  237.          FontItalic      =   0   'False
  238.          FontName        =   "MS Sans Serif"
  239.          FontSize        =   9.75
  240.          FontStrikethru  =   0   'False
  241.          FontUnderline   =   0   'False
  242.          ForeColor       =   &H00FF0000&
  243.          Height          =   375
  244.          Index           =   23
  245.          Left            =   3495
  246.          TabIndex        =   20
  247.          Top             =   3300
  248.          Width           =   375
  249.       End
  250.       Begin SSCommand cmdGlossary 
  251.          Caption         =   "X"
  252.          FontBold        =   -1  'True
  253.          FontItalic      =   0   'False
  254.          FontName        =   "MS Sans Serif"
  255.          FontSize        =   9.75
  256.          FontStrikethru  =   0   'False
  257.          FontUnderline   =   0   'False
  258.          ForeColor       =   &H00FF0000&
  259.          Height          =   375
  260.          Index           =   24
  261.          Left            =   3870
  262.          TabIndex        =   19
  263.          Top             =   3300
  264.          Width           =   375
  265.       End
  266.       Begin SSCommand cmdGlossary 
  267.          Caption         =   "Y"
  268.          FontBold        =   -1  'True
  269.          FontItalic      =   0   'False
  270.          FontName        =   "MS Sans Serif"
  271.          FontSize        =   9.75
  272.          FontStrikethru  =   0   'False
  273.          FontUnderline   =   0   'False
  274.          ForeColor       =   &H00FF0000&
  275.          Height          =   375
  276.          Index           =   25
  277.          Left            =   4245
  278.          TabIndex        =   18
  279.          Top             =   3300
  280.          Width           =   375
  281.       End
  282.       Begin SSCommand cmdGlossary 
  283.          Caption         =   "Z"
  284.          FontBold        =   -1  'True
  285.          FontItalic      =   0   'False
  286.          FontName        =   "MS Sans Serif"
  287.          FontSize        =   9.75
  288.          FontStrikethru  =   0   'False
  289.          FontUnderline   =   0   'False
  290.          ForeColor       =   &H00FF0000&
  291.          Height          =   375
  292.          Index           =   26
  293.          Left            =   4620
  294.          TabIndex        =   17
  295.          Top             =   3300
  296.          Width           =   375
  297.       End
  298.       Begin SSCommand cmdGlossary 
  299.          Caption         =   "N"
  300.          FontBold        =   -1  'True
  301.          FontItalic      =   0   'False
  302.          FontName        =   "MS Sans Serif"
  303.          FontSize        =   9.75
  304.          FontStrikethru  =   0   'False
  305.          FontUnderline   =   0   'False
  306.          ForeColor       =   &H00FF0000&
  307.          Height          =   375
  308.          Index           =   14
  309.          Left            =   120
  310.          TabIndex        =   16
  311.          Top             =   3300
  312.          Width           =   375
  313.       End
  314.       Begin SSCommand cmdGlossary 
  315.          Caption         =   "B"
  316.          FontBold        =   -1  'True
  317.          FontItalic      =   0   'False
  318.          FontName        =   "MS Sans Serif"
  319.          FontSize        =   9.75
  320.          FontStrikethru  =   0   'False
  321.          FontUnderline   =   0   'False
  322.          ForeColor       =   &H00FF0000&
  323.          Height          =   375
  324.          Index           =   2
  325.          Left            =   495
  326.          TabIndex        =   15
  327.          Top             =   2940
  328.          Width           =   375
  329.       End
  330.       Begin SSCommand cmdGlossary 
  331.          Caption         =   "C"
  332.          FontBold        =   -1  'True
  333.          FontItalic      =   0   'False
  334.          FontName        =   "MS Sans Serif"
  335.          FontSize        =   9.75
  336.          FontStrikethru  =   0   'False
  337.          FontUnderline   =   0   'False
  338.          ForeColor       =   &H00FF0000&
  339.          Height          =   375
  340.          Index           =   3
  341.          Left            =   870
  342.          TabIndex        =   14
  343.          Top             =   2940
  344.          Width           =   375
  345.       End
  346.       Begin SSCommand cmdGlossary 
  347.          Caption         =   "D"
  348.          FontBold        =   -1  'True
  349.          FontItalic      =   0   'False
  350.          FontName        =   "MS Sans Serif"
  351.          FontSize        =   9.75
  352.          FontStrikethru  =   0   'False
  353.          FontUnderline   =   0   'False
  354.          ForeColor       =   &H00FF0000&
  355.          Height          =   375
  356.          Index           =   4
  357.          Left            =   1245
  358.          TabIndex        =   13
  359.          Top             =   2940
  360.          Width           =   375
  361.       End
  362.       Begin SSCommand cmdGlossary 
  363.          Caption         =   "E"
  364.          FontBold        =   -1  'True
  365.          FontItalic      =   0   'False
  366.          FontName        =   "MS Sans Serif"
  367.          FontSize        =   9.75
  368.          FontStrikethru  =   0   'False
  369.          FontUnderline   =   0   'False
  370.          ForeColor       =   &H00FF0000&
  371.          Height          =   375
  372.          Index           =   5
  373.          Left            =   1620
  374.          TabIndex        =   12
  375.          Top             =   2940
  376.          Width           =   375
  377.       End
  378.       Begin SSCommand cmdGlossary 
  379.          Caption         =   "F"
  380.          FontBold        =   -1  'True
  381.          FontItalic      =   0   'False
  382.          FontName        =   "MS Sans Serif"
  383.          FontSize        =   9.75
  384.          FontStrikethru  =   0   'False
  385.          FontUnderline   =   0   'False
  386.          ForeColor       =   &H00FF0000&
  387.          Height          =   375
  388.          Index           =   6
  389.          Left            =   1995
  390.          TabIndex        =   11
  391.          Top             =   2940
  392.          Width           =   375
  393.       End
  394.       Begin SSCommand cmdGlossary 
  395.          Caption         =   "G"
  396.          FontBold        =   -1  'True
  397.          FontItalic      =   0   'False
  398.          FontName        =   "MS Sans Serif"
  399.          FontSize        =   9.75
  400.          FontStrikethru  =   0   'False
  401.          FontUnderline   =   0   'False
  402.          ForeColor       =   &H00FF0000&
  403.          Height          =   375
  404.          Index           =   7
  405.          Left            =   2370
  406.          TabIndex        =   10
  407.          Top             =   2940
  408.          Width           =   375
  409.       End
  410.       Begin SSCommand cmdGlossary 
  411.          Caption         =   "H"
  412.          FontBold        =   -1  'True
  413.          FontItalic      =   0   'False
  414.          FontName        =   "MS Sans Serif"
  415.          FontSize        =   9.75
  416.          FontStrikethru  =   0   'False
  417.          FontUnderline   =   0   'False
  418.          ForeColor       =   &H00FF0000&
  419.          Height          =   375
  420.          Index           =   8
  421.          Left            =   2745
  422.          TabIndex        =   9
  423.          Top             =   2940
  424.          Width           =   375
  425.       End
  426.       Begin SSCommand cmdGlossary 
  427.          Caption         =   "I"
  428.          FontBold        =   -1  'True
  429.          FontItalic      =   0   'False
  430.          FontName        =   "MS Sans Serif"
  431.          FontSize        =   9.75
  432.          FontStrikethru  =   0   'False
  433.          FontUnderline   =   0   'False
  434.          ForeColor       =   &H00FF0000&
  435.          Height          =   375
  436.          Index           =   9
  437.          Left            =   3120
  438.          TabIndex        =   8
  439.          Top             =   2940
  440.          Width           =   375
  441.       End
  442.       Begin SSCommand cmdGlossary 
  443.          Caption         =   "J"
  444.          FontBold        =   -1  'True
  445.          FontItalic      =   0   'False
  446.          FontName        =   "MS Sans Serif"
  447.          FontSize        =   9.75
  448.          FontStrikethru  =   0   'False
  449.          FontUnderline   =   0   'False
  450.          ForeColor       =   &H00FF0000&
  451.          Height          =   375
  452.          Index           =   10
  453.          Left            =   3495
  454.          TabIndex        =   7
  455.          Top             =   2940
  456.          Width           =   375
  457.       End
  458.       Begin SSCommand cmdGlossary 
  459.          Caption         =   "K"
  460.          FontBold        =   -1  'True
  461.          FontItalic      =   0   'False
  462.          FontName        =   "MS Sans Serif"
  463.          FontSize        =   9.75
  464.          FontStrikethru  =   0   'False
  465.          FontUnderline   =   0   'False
  466.          ForeColor       =   &H00FF0000&
  467.          Height          =   375
  468.          Index           =   11
  469.          Left            =   3870
  470.          TabIndex        =   6
  471.          Top             =   2940
  472.          Width           =   375
  473.       End
  474.       Begin SSCommand cmdGlossary 
  475.          Caption         =   "L"
  476.          FontBold        =   -1  'True
  477.          FontItalic      =   0   'False
  478.          FontName        =   "MS Sans Serif"
  479.          FontSize        =   9.75
  480.          FontStrikethru  =   0   'False
  481.          FontUnderline   =   0   'False
  482.          ForeColor       =   &H00FF0000&
  483.          Height          =   375
  484.          Index           =   12
  485.          Left            =   4245
  486.          TabIndex        =   5
  487.          Top             =   2940
  488.          Width           =   375
  489.       End
  490.       Begin SSCommand cmdGlossary 
  491.          Caption         =   "M"
  492.          FontBold        =   -1  'True
  493.          FontItalic      =   0   'False
  494.          FontName        =   "MS Sans Serif"
  495.          FontSize        =   9.75
  496.          FontStrikethru  =   0   'False
  497.          FontUnderline   =   0   'False
  498.          ForeColor       =   &H00FF0000&
  499.          Height          =   375
  500.          Index           =   13
  501.          Left            =   4620
  502.          TabIndex        =   4
  503.          Top             =   2940
  504.          Width           =   375
  505.       End
  506.       Begin SSCommand cmdGlossary 
  507.          Caption         =   "A"
  508.          FontBold        =   -1  'True
  509.          FontItalic      =   0   'False
  510.          FontName        =   "MS Sans Serif"
  511.          FontSize        =   9.75
  512.          FontStrikethru  =   0   'False
  513.          FontUnderline   =   0   'False
  514.          ForeColor       =   &H00FF0000&
  515.          Height          =   375
  516.          Index           =   1
  517.          Left            =   120
  518.          TabIndex        =   3
  519.          Top             =   2940
  520.          Width           =   375
  521.       End
  522.       Begin SSCommand cmdHelp 
  523.          BevelWidth      =   3
  524.          Caption         =   "Help"
  525.          Font3D          =   4  'Inset w/heavy shading
  526.          FontBold        =   -1  'True
  527.          FontItalic      =   0   'False
  528.          FontName        =   "Arial"
  529.          FontSize        =   18
  530.          FontStrikethru  =   0   'False
  531.          FontUnderline   =   0   'False
  532.          ForeColor       =   &H0000FF00&
  533.          Height          =   735
  534.          Left            =   120
  535.          TabIndex        =   2
  536.          Top             =   2220
  537.          Width           =   1145
  538.       End
  539.       Begin TextBox txtIntro 
  540.          Alignment       =   2  'Center
  541.          BackColor       =   &H00FFFFFF&
  542.          Enabled         =   0   'False
  543.          ForeColor       =   &H00800000&
  544.          Height          =   2115
  545.          HideSelection   =   0   'False
  546.          Left            =   120
  547.          MultiLine       =   -1  'True
  548.          TabIndex        =   1
  549.          TabStop         =   0   'False
  550.          Top             =   120
  551.          Width           =   4860
  552.       End
  553.    End
  554.    Begin Menu menuExit 
  555.       Caption         =   "E&xit"
  556.    End
  557.    Begin Menu mnuCopyright 
  558.       Caption         =   "&Copyright"
  559.    End
  560.    Begin Menu mnuHelp 
  561.       Caption         =   "&Help"
  562.       Begin Menu mnuContents 
  563.          Caption         =   "&Contents"
  564.       End
  565.       Begin Menu mnuSearch 
  566.          Caption         =   "&Search"
  567.       End
  568.       Begin Menu mnuGlossary 
  569.          Caption         =   "&Glossary"
  570.       End
  571.       Begin Menu mnuReadMeFirst 
  572.          Caption         =   "&Read Me First"
  573.       End
  574.       Begin Menu mnuSep1 
  575.          Caption         =   "-"
  576.       End
  577.       Begin Menu mnuHelpOnHelp 
  578.          Caption         =   "&Help On Help"
  579.       End
  580.    End
  581. Sub cmdClose_Click (Index As Integer)
  582. Dim macro As String
  583.    If Index = 0 Then
  584.       macro = "CloseWindow(`main')"
  585.    ElseIf Index = 1 Then
  586.       macro = "CloseWindow(`glos_win')"
  587.    ElseIf Index = 3 Then
  588.       macro = "Print()"
  589.    Else
  590.       macro = "CopyDialog()"
  591.    End If
  592.    Call HelpMenu(8, 0, macro)
  593. End Sub
  594. Sub cmdGlossary_Click (Index As Integer)
  595. Dim Letter As String
  596. Dim macro As String
  597. 'Letter is equal to the context string we want to jump to
  598.    Letter = Chr$(Index + 96)
  599.    macro = "JumpId(`helpinfo.hlp>glos_win',`" & Letter & "')"
  600.    Call HelpMenu(7, 0, macro)
  601. End Sub
  602. Sub cmdHelp_Click ()
  603.    Call HelpMenu(3, 3, "")
  604. End Sub
  605. Sub Form_Load ()
  606.    crlf$ = Chr$(13) + Chr$(10)
  607.    m$ = "This program illustrates how to intergrate a Windows Help file "
  608.    m$ = m$ & "into a VB program. It has no other function."
  609.    m$ = m$ & crlf$
  610.    m$ = m$ & crlf$
  611.    m$ = m$ & "The best way to learn is to work with the program and then study the "
  612.    m$ = m$ & "source code, which is provided."
  613.    m$ = m$ & crlf$
  614.    m$ = m$ & crlf$
  615.    m$ = m$ & "To start, click the Help button "
  616.    m$ = m$ & "below and also select Read Me First from the Help menu. They show "
  617.    m$ = m$ & "how to access a specific help topic in two ways."
  618.    txtIntro.Text = m$
  619. End Sub
  620. Sub HelpMenu (HelpOption As Integer, ContextNum As Long, macro As String)
  621.    Select Case HelpOption
  622.       Case 1  'Display the contents topic
  623.          r = WinHelpByNum(frmHelpInfohWnd, App.HelpFile, HELP_CONTENTS, 0)
  624.       
  625.       Case 2  'Display the Search Dialog Box (See Note 1 at bottom.)
  626.          r = WinHelpByStr(frmHelpInfohWnd, App.HelpFile, HELP_PARTIALKEY, "")
  627.          
  628.       Case 3  'Display the Read_Me_First topic using the MAPed context number
  629.          r = WinHelpByNum(frmHelpInfohWnd, App.HelpFile, HELP_CONTEXT, ContextNum)
  630.       
  631.       Case 4  'Display Glossary in secondary window  (See Note 2 at bottom.)
  632.          macro = "JumpId(`" & App.HelpFile & ">glos_win',`glossary')"
  633.          r = WinHelpByNum(frmHelpInfohWnd, App.HelpFile, HELP_FORCEFILE, 0)
  634.          r = WinHelpByStr(frmHelpInfohWnd, App.HelpFile, HELP_COMMAND, macro)
  635.       
  636.       Case 5  'Help on Help
  637.          r = WinHelpByNum(frmHelpInfohWnd, "dummy", HELP_HELPONHELP, 0)
  638.       Case 6  'Terminate the Help file. (Make sure to do this before exiting the application.)
  639.          r = WinHelpByNum(frmHelpInfohWnd, App.HelpFile, HELP_QUIT, 0)
  640.       
  641.       Case 7  'Execute jump macro to specific glossary letter and close the main help window. This is a generalization of Case 4.
  642.          r = WinHelpByNum(frmHelpInfohWnd, App.HelpFile, HELP_FORCEFILE, 0)
  643.          r = WinHelpByStr(frmHelpInfohWnd, App.HelpFile, HELP_COMMAND, macro)
  644.          r = WinHelpByStr(frmHelpInfohWnd, App.HelpFile, HELP_COMMAND, "CloseWindow(`main')")
  645.       Case 8  'Execute macro
  646.          r = WinHelpByStr(frmHelpInfohWnd, App.HelpFile, HELP_COMMAND, macro)
  647.    End Select
  648. '*******************************************************************
  649. 'NOTE 1
  650. '      The "traditional" way you might think to invoke the Search Dialog Box is to
  651. '      use the HELP_COMMAND and pass the Search macro, as in the statement below:
  652. '         r = WinHelpByStr(frmHelpInfohWnd, App.HelpFile, HELP_COMMAND, "Search()")
  653. '      This works fine, the Help file is started and the content topic displayed. Then
  654. '      the Search Dialog Box is brought up, as if the user had clicked the Search
  655. '      Button.
  656. '      A better way (I think), and the way VB Help works, is to use the HELP_PARTIALKEY
  657. '      command and pass a null string keyword, as in Case 2 above. Using this
  658. '      method, the Search Dialog Box is brought up in the calling application. After
  659. '      the user selects a topic, that topic is displayed directly, bypassing the
  660. '      content topic.
  661. 'NOTE 2
  662. '      It is not possible to display a secondary window, without first displaying the
  663. '      main window (as far as I can figure out), which is what the HELP_FORCEFILE does.
  664. '      (If anybody knows different, please pass it on to me.)
  665. End Sub
  666. Sub menuExit_Click ()
  667.    Call HelpMenu(6, 0, "")
  668.    End
  669. End Sub
  670. Sub mnuContents_Click ()
  671.    Call HelpMenu(1, 0, "")
  672. End Sub
  673. Sub mnuCopyright_Click ()
  674.    t$ = "Copyright 
  675. 1993 Crunch Software Corporation"
  676.    m$ = m$ & "This file and all ancillary materials that came with it are copyrighted. You "
  677.    m$ = m$ & "are granted a royalty-free right to incorporate these works, in whole or in "
  678.    m$ = m$ & "part, into other products, so long as you don't hold Crunch Software "
  679.    m$ = m$ & "responsible. You may distribute these materials as you see fit, on a non-"
  680.    m$ = m$ & "commercial basis. However, you must distribute all the files together."
  681.    MsgBox m$, 64, t$
  682. End Sub
  683. Sub mnuGlossary_Click ()
  684.    Call HelpMenu(4, 0, "")
  685. End Sub
  686. Sub mnuHelpOnHelp_Click ()
  687.    Call HelpMenu(5, 0, "")
  688. End Sub
  689. Sub mnuReadMeFirst_Click ()
  690.    Call HelpMenu(3, 3, "")
  691. End Sub
  692. Sub mnuSearch_Click ()
  693.    Call HelpMenu(2, 0, "")
  694. End Sub
  695.